package com.yyge.controller.admin.employee.resp;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yyge.common.annon.DictTypeAnnon;
import com.yyge.common.enums.DictTypeEnum;
import com.yyge.util.easyexcel.convert.DictTypeConvert;
import com.yyge.util.easyexcel.convert.UrlToImageConverter;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

/**
 * @Desc 返回对象
 * @Author: Gityyge
 * @Date: 2023/7/2 20:37:04
 */

@Getter
@Setter
@ToString
@ExcelIgnoreUnannotated
@ContentRowHeight(150)
public class EmployeeResp {

     /**
      * 主键
      */
      @ExcelProperty(value = "主键")
      private Long id;

     /**
      * 登录账户
      */
      @ExcelProperty(value = "账号")
      private String loginName;

     /**
      * 登录密码
      */
      @ExcelProperty(value = "密码")
      private String loginPwd;

     /**
      * 性别(0 女 1 男)
      */
      @DictTypeAnnon(value = DictTypeEnum.sys_user_sex)
      @ExcelProperty(value = "性别", converter = DictTypeConvert.class)
      private String gender;

     /**
      * 状态（1停用，0正常）
      */
      @DictTypeAnnon(value = DictTypeEnum.sys_normal_disable)
      @ExcelProperty(value = "状态", converter = DictTypeConvert.class)
      private String status;

     /**
      * 头像
      */
      @ColumnWidth(30)
      @ExcelProperty(value = "头像",converter = UrlToImageConverter.class)
      private String avatar;

     /**
      * 创建时间
      */
     @ExcelProperty(value = "创建时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private Date createTime;

     /**
      * 创建人
      */
     @ExcelProperty(value = "创建人")
      private String createBy;

     /**
      * 修改时间
      */
     @ExcelProperty(value = "修改时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private Date updateTime;

     /**
      * 修改人
      */
     @ExcelProperty(value = "修改人")
      private String updateBy;
}
